﻿using FileServerProject;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;

namespace TestFileServerCRUD
{
    
    
    /// <summary>
    ///This is a test class for UserOperationsTest and is intended
    ///to contain all UserOperationsTest Unit Tests
    ///</summary>
    [TestClass()]
    public class UserOperationsTest
    {


        private TestContext testContextInstance;
        
        #region Additional test attributes
        // 
        //You can use the following additional attributes as you write your tests:
        //
        //Use ClassInitialize to run code before running the first test in the class
        //[ClassInitialize()]
        //public static void MyClassInitialize(TestContext testContext)
        //{
        //}
        //Use TestCleanup to run code after each test has run
        //[TestCleanup()]
        //public void MyTestCleanup()
        //{
        //}
        //
        #endregion


        /// <summary>
        ///A test for AddUpdateUser
        ///</summary>
        [TestMethod()]
        public void AddUpdateUserTest()
        {
            User stefcho = new User()
            {
                UserName = "Stefan",
                Password = "Penka"
            };
            UserOperations.AddUpdateUser(stefcho);
            Assert.IsTrue(stefcho.UserID > 0);
        }

        /// <summary>
        ///A test for DeleteUser
        ///</summary>
        [TestMethod()]
        public void DeleteUserTest()
        {
            User user = null; // TODO: Initialize to an appropriate value
            UserOperations.DeleteUser(user);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }

        /// <summary>
        ///A test for SelectUser
        ///</summary>
        //[TestMethod()]
        //public void SelectUserTest()
        //{
        //    User user = null; // TODO: Initialize to an appropriate value
        //    User expected = null; // TODO: Initialize to an appropriate value
        //    User actual;
        //    actual = UserOperations.SelectUser(userID);
        //    Assert.AreEqual(expected, actual);
        //    Assert.Inconclusive("Verify the correctness of this test method.");
        //}
    }
}
